#!/usr/bin/env perl

###########
#描述：过滤外部来源
###########

use warnings;
use strict;

while(my $line = <STDIN>){
	chomp($line);
	my @cols = split(/\t/,$line);
	my $refer = $cols[8];

	if($refer =~ m/auto.sohu.com/ || $refer eq "/"){
		next;
	} else{
		my $index = index($refer,"?");
		if($index > -1){
			$refer = substr($refer,0,$index)
		}
	}
	printf("%s\n",$refer);
}
